﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Venue2.aspx.cs" Theme="YUI"
    Inherits="Home_Venue2" %>

<%@ Register Src="../UserControls/Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>PlacementManager: Venues</title>
    <link rel="stylesheet" type="text/css" href="../build/assets/skins/sam/layout.css">
    <link rel="stylesheet" type="text/css" href="../build/assets/skins/sam/resize.css">
    <!-- Utility Dependencies -->

    <script src="../build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>

    <script src="../build/dragdrop/dragdrop-min.js" type="text/javascript"></script>

    <script src="../build/element/element-beta-min.js" type="text/javascript"></script>

    <!-- Optional Animation -->

    <script src="../build/animation/animation-min.js" type="text/javascript"></script>

    <!-- Source file for the Resize Utility -->

    <script src="../build/resize/resize-beta-min.js" type="text/javascript"></script>

    <!-- Source file for the Layout Manager -->

    <script src="../build/layout/layout-beta-min.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
    function showToolTip(e,text){ 
      var ToolTip = document.getElementById("ToolTip");
      ToolTip.innerHTML=text; 
      ToolTip.style.left=(e.clientX+15+document.body.scrollLeft)+'px'; 
      ToolTip.style.top=(e.clientY+document.body.scrollTop)+'px';  
      ToolTip.style.display="block";
    } 
    function hideToolTip(){ 
        var ToolTip = document.getElementById("ToolTip");
        ToolTip.style.display="none"; 
    } 
    function showAddVenue()
    {
        var divAddVenue = document.getElementById("divAddVenue");
        divAddVenue.style.display = "block";
    }
    function hideAddVenue()
    {
        var divAddVenue = document.getElementById("divAddVenue");
        divAddVenue.style.display = "none";
    }
    function showAddContact()
    {
        var divAddContact = document.getElementById("divAddContact");
        divAddContact.style.display = "block";
    }
    function hideAddContact()
    {
        var divAddContact = document.getElementById("divAddContact");
        divAddContact.style.display = "none";
    }
    function showAddNote()
    {
        var divAddContact = document.getElementById("divAddNote");
        divAddContact.style.display = "block";
    }
    function hideAddNote()
    {
        var divAddContact = document.getElementById("divAddNote");
        divAddContact.style.display = "none";
    }
    
  function CheckContactNumberValueRequiredFieldValidator(sender, args)
  {
         if(args.valueOf()==null)
         {
  
              args.IsValid = false;
              return;
         }        

    args.IsValid = true;
  }

    </script>

</head>
<body class="yui-skin-sam">
    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="True">
    </ajaxToolkit:ToolkitScriptManager>
    <div id="ToolTip" style="position: absolute; z-index: 1000; text-align: left; display: none;">
    </div>
    <div id="doc3" class="yui-t2">
        <div id="hd" visible="true">
            <uc1:Menu ID="Menu1" runat="server" />
        </div>
        <div id="bd">
            <div id="menu" class="yui-b">
                <asp:UpdatePanel ID="updtpnlFilter" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                    <ContentTemplate>
                        <div style="background-color: #AD8282; width: 155px; padding-left: 3px; padding-right: 3px;
                            padding-bottom: 3px; padding-top: 3px;">
                            <asp:TextBox ID="txtSearchName" runat="server" Width="120px"></asp:TextBox>
                            <asp:ImageButton ID="imgbtnSearch" runat="server" ImageUrl="~/Images/Icons/search.gif"
                                CssClass="SearchImageButton" ImageAlign="AbsMiddle" OnClick="imgbtnSearch_Click" />
                            <ajaxToolkit:AutoCompleteExtender ID="aceSearchName" runat="server" ServiceMethod="GetVenues"
                                ServicePath="../WebServices/VenueService.asmx" TargetControlID="txtSearchName">
                            </ajaxToolkit:AutoCompleteExtender>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:UpdatePanel ID="updtpnlVenuesGrid" runat="server" UpdateMode="Conditional">
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="imgbtnSearch" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="tabContMain$tbpnlDetails$fvVenueDetail" EventName="ItemUpdated" />
                    </Triggers>
                    <ContentTemplate>
                        <asp:GridView ID="gvVenues" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            DataKeyNames="VenueId" DataSourceID="ldsVenues" SelectedIndex="0" SkinID="Results"
                            PageSize="15" GridLines="None" CellPadding="0" ShowHeader="False" OnSelectedIndexChanged="gvVenues_SelectedIndexChanged">
                            <Columns>
                                <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Images/Icons/edit.gif" />
                                <asp:TemplateField ShowHeader="False" SortExpression="VenueName">
                                    <ItemTemplate>
                                        <asp:Label ID="lblVenueName" runat="server" Text='<%# Eval("VenueName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                No venues found
                            </EmptyDataTemplate>
                            <PagerSettings Mode="NumericFirstLast" />
                        </asp:GridView>
                        <asp:LinqDataSource ID="ldsVenues" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                            OnSelecting="ldsVenues_Selecting" TableName="Venues">
                        </asp:LinqDataSource>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="30" DynamicLayout="false">
                    <ProgressTemplate>
                        <div class="progressBackgroundFilter">
                        </div>
                        <div class="processMessage">
                            <p align="center">
                                <br />
                                <img src="../Images/bigrotation2.gif" alt="Loading" align="middle" />
                                <br />
                                Loading...</p>
                        </div>
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </div>
            <div id="yui-main">
                <div class="yui-b">
                    <span style="font-size: large; font-weight: bold; float: left;">Manage Venues</span>
                    <br />
                    <br />
                    <ajaxToolkit:TabContainer ID="tabContMain" runat="server" ActiveTabIndex="0">
                        <ajaxToolkit:TabPanel HeaderText="Details" ID="tbpnlDetails" runat="server">
                            <HeaderTemplate>
                                Details
                            </HeaderTemplate>
                            <ContentTemplate>
                                <div class="yui-g">
                                    <div class="yui-u first">
                                        <asp:UpdatePanel ID="updtpnlVenueDetail" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <fieldset>
                                                    <legend>Details</legend>
                                                    <asp:FormView ID="fvVenueDetail" runat="server" DataKeyNames="VenueId" DataSourceID="ldsVenueDetail"
                                                        DefaultMode="Edit" OnItemInserting="fvVenueDetail_ItemInserting" OnItemInserted="fvVenueDetail_ItemInserted1"
                                                        OnItemUpdating="fvVenueDetail_ItemUpdating" OnModeChanged="fvVenueDetail_ModeChanged">
                                                        <EditItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        Venue Name:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="VenueNameTextBox" runat="server" Text='<%# Bind("VenueName") %>'
                                                                            ValidationGroup="EditVenueDetails" /><asp:RequiredFieldValidator ID="VenueNameValidator"
                                                                                runat="server" ControlToValidate="VenueNameTextBox" ErrorMessage="*" ValidationGroup="EditVenueDetails"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Telephone Number:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="TelephoneNumberTextBox" runat="server" Text='<%# Bind("TelephoneNumber") %>'
                                                                            ValidationGroup="EditVenueDetails" /><asp:RequiredFieldValidator ID="TelephoneReqValidator"
                                                                                runat="server" ControlToValidate="TelephoneNumberTextBox" ErrorMessage="*" ValidationGroup="EditVenueDetails"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Fax:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="FaxTextBox" runat="server" Text='<%# Bind("Fax") %>' ValidationGroup="EditVenueDetails" />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Generic Email:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="GenericEmailTextBox" runat="server" Text='<%# Bind("GenericEmail") %>'
                                                                            ValidationGroup="EditVenueDetails" /><asp:RequiredFieldValidator ID="EmailReqField"
                                                                                runat="server" ControlToValidate="GenericEmailTextBox" ErrorMessage="*" ValidationGroup="EditVenueDetails"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        IsActive:
                                                                    </td>
                                                                    <td>
                                                                        <asp:CheckBox ID="IsActiveCheckBox" runat="server" Checked='<%# Bind("IsActive") %>'
                                                                            ValidationGroup="EditVenueDetails" />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        DateCreated:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="DateCreatedTextBox" runat="server" Text='<%# Bind("DateCreated") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        CreatedBy:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="CreatedByTextBox" runat="server" Text='<%# Bind("CreatedBy") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        DateUpdated:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="DateUpdatedTextBox" runat="server" Text='<%# Bind("DateUpdated") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        UpdatedBy:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="UpdatedByTextBox" runat="server" Text='<%# Bind("UpdatedBy") %>' />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="GenericEmailTextBox"
                                                                ErrorMessage="Valid Email Address is Required(*)" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                                ValidationGroup="EditVenueDetails"></asp:RegularExpressionValidator><br />
                                                            <asp:ImageButton ID="UpdateButton" runat="server" CommandName="Update" ImageUrl="~/Images/Icons/refresh.gif"
                                                                ToolTip="Update" ValidationGroup="EditVenueDetails" />&#160;&nbsp;<asp:ImageButton
                                                                    ID="NewButton" runat="server" CommandName="New" ImageAlign="Baseline" ImageUrl="~/Images/Icons/plus.gif"
                                                                    ToolTip="Add New" CausesValidation="False" ValidationGroup="EditVenueDetails" />
                                                        </EditItemTemplate>
                                                        <InsertItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        Venue Name:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="VenueNameTextBox" runat="server" Text='<%# Bind("VenueName") %>'
                                                                            ValidationGroup="InsertDetail" /><asp:RequiredFieldValidator ID="VenueReqFieldValidator"
                                                                                runat="server" ControlToValidate="VenueNameTextBox" ErrorMessage="*" ValidationGroup="InsertDetail"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Telephone Number:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="TelephoneNumberTextBox" runat="server" Text='<%# Bind("TelephoneNumber") %>'
                                                                            ValidationGroup="InsertDetail" /><asp:RequiredFieldValidator ID="TelephoneNumberReqFieldValidator"
                                                                                runat="server" ControlToValidate="TelephoneNumberTextBox" ErrorMessage="*" ValidationGroup="InsertDetail"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Fax:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="FaxTextBox" runat="server" Text='<%# Bind("Fax") %>' ValidationGroup="InsertDetail" />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Generic Email:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="GenericEmailTextBox" runat="server" Text='<%# Bind("GenericEmail") %>'
                                                                            ValidationGroup="InsertDetail" /><asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                                                                runat="server" ControlToValidate="GenericEmailTextBox" ErrorMessage="*" ValidationGroup="InsertDetail"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="GenericEmailTextBox"
                                                                ErrorMessage="Valid Email Address Required(*)" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                                ValidationGroup="InsertDetail" SetFocusOnError="True"></asp:RegularExpressionValidator><br />
                                                            <asp:CustomValidator ID="DuplicateVenueValidator" runat="server" ControlToValidate="VenueNameTextBox"
                                                                ErrorMessage="Venue Name already exists!" ValidationGroup="InsertDetail"></asp:CustomValidator><br />
                                                            <br />
                                                            <asp:ImageButton ID="BtnSave" runat="server" CommandName="Insert" ImageUrl="~/Images/Icons/diskette.gif"
                                                                ToolTip="Save" CausesValidation="true" ValidationGroup="InsertDetail" />&#160;&nbsp;<asp:ImageButton
                                                                    ID="BtnCancel" runat="server" CommandName="Cancel" ImageUrl="~/Images/Icons/against.gif"
                                                                    ToolTip="Cancel" CausesValidation="False" /><br />
                                                            <br />
                                                            <br />
                                                        </InsertItemTemplate>
                                                    </asp:FormView>
                                                    <asp:LinqDataSource ID="ldsVenueDetail" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        EnableInsert="True" EnableUpdate="True" TableName="Venues" Where="VenueId == @VenueId"
                                                        EnableDelete="True">
                                                        <WhereParameters>
                                                            <asp:ControlParameter ControlID="gvVenues" DefaultValue="0" Name="VenueId" PropertyName="SelectedValue"
                                                                Type="Int32" />
                                                        </WhereParameters>
                                                    </asp:LinqDataSource>
                                                </fieldset>
                                                <fieldset dir="ltr">
                                                    <legend>Addresses</legend>
                                                    <asp:ListView ID="lvVenueAddresses" runat="server" DataKeyNames="AddressId" DataSourceID="ldsVenueAddresses"
                                                        InsertItemPosition="LastItem" OnItemInserting="lvVenueAddresses_ItemInserting"
                                                        OnItemUpdating="lvVenueAddresses_ItemUpdating">
                                                        <LayoutTemplate>
                                                            <div id="itemPlaceholderContainer" runat="server" style="">
                                                                <span id="itemPlaceholder" runat="server" />
                                                            </div>
                                                            <div style="">
                                                            </div>
                                                        </LayoutTemplate>
                                                        <InsertItemTemplate>
                                                            <table>
                                                                <br />
                                                                <tr>
                                                                    <td colspan="2">
                                                                        <asp:Label ID="Label4" runat="server" BorderColor="#CCCCCC" Text="Insert new address:"
                                                                            Font-Underline="True" ForeColor="Black"></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Address1:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="Address1TextBox" runat="server" Text='<%# Bind("Address1") %>' ValidationGroup="InsertAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Address1TextBox"
                                                                            ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Address2:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="Address2TextBox" runat="server" Text='<%# Bind("Address2") %>' ValidationGroup="InsertAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Address2TextBox"
                                                                            ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Street:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="StreetTextBox" runat="server" Text='<%# Bind("Street") %>' ValidationGroup="InsertAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="StreetTextBox"
                                                                            ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        City:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="CityTextBox" runat="server" Text='<%# Bind("City") %>' ValidationGroup="InsertAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="CityTextBox"
                                                                            ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        PostCode:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="PostCodeTextBox" runat="server" Text='<%# Bind("PostCode") %>'></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="PostCodeTextBox"
                                                                            ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        State:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:DropDownList ID="State" runat="server" DataSourceID="ldsGeo_States" DataTextField="DivisionName"
                                                                                DataValueField="AdministrativeDivisionID" Font-Size="8pt" Height="19px" Width="155px"
                                                                                ValidationGroup="InsertAddressGroup">
                                                                                <asp:ListItem Selected="True"></asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </span>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="State"
                                                                            ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Country:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:DropDownList ID="Country" runat="server" DataSourceID="ldsCountry" DataTextField="CountryName"
                                                                                DataValueField="CountryID" Height="19px" Width="155px" Font-Size="8pt" ValidationGroup="InsertAddressGroup">
                                                                                <asp:ListItem Selected="True"></asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </span>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="Country"
                                                                            ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="style2">
                                                                        <asp:ImageButton ID="AddressNewSaveBtn" runat="server" CommandName="Insert" ImageUrl="~/Images/Icons/diskette.gif"
                                                                            ToolTip="Insert" ValidationGroup="InsertAddressGroup" />&#160;&nbsp;<asp:ImageButton
                                                                                ID="NewAddressCancelBtn" runat="server" CommandName="Cancel" ImageUrl="~/Images/Icons/against.gif"
                                                                                CausesValidation="false" ToolTip="Cancel" ValidationGroup="InsertAddressGroup" />
                                                                    </td>
                                                                    <td class="style2">
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </InsertItemTemplate>
                                                        <EmptyDataTemplate>
                                                            <span>No data was returned.</span></EmptyDataTemplate>
                                                        <EditItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <br></br>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Address1:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="EditAddress1" runat="server" Text='<%# Bind("Address1") %>' ValidationGroup="EditAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="EditAddress1"
                                                                            ErrorMessage="*" ValidationGroup="EditAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Address2:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="EditAddress2" runat="server" Text='<%# Bind("Address2") %>' ValidationGroup="EditAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="EditAddress2"
                                                                            ErrorMessage="*" ValidationGroup="EditAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Street:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="EditStreet" runat="server" Text='<%# Bind("Street") %>' ValidationGroup="EditAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="EditStreet"
                                                                            ErrorMessage="*" ValidationGroup="EditAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        City:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="EditCity" runat="server" Text='<%# Bind("City") %>' ValidationGroup="EditAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="EditCity"
                                                                            ErrorMessage="*" ValidationGroup="EditAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        PostCode:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="EditPostCodeTextBox" runat="server" Text='<%# Bind("PostCode") %>'
                                                                            ValidationGroup="EditAddressGroup"></asp:TextBox>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="EditPostCodeTextBox"
                                                                            ErrorMessage="*" ValidationGroup="EditAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        State:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:DropDownList ID="EditState" runat="server" AutoPostBack="false" DataSourceID="ldsGeo_States"
                                                                                DataTextField="DivisionName" DataValueField="AdministrativeDivisionID" Height="19px"
                                                                                Width="155px" SelectedValue='<%# Bind("StateId") %>' Font-Size="8pt" ValidationGroup="EditAddressGroup">
                                                                                <asp:ListItem Selected="True"></asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </span>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="EditState"
                                                                            ErrorMessage="*" ValidationGroup="EditAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Country:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:DropDownList ID="EditCountry" runat="server" AutoPostBack="False" DataSourceID="ldsCountry"
                                                                                DataTextField="CountryName" DataValueField="CountryID" SelectedValue='<%# Bind("CountryId") %>'
                                                                                Height="19px" Width="155px" Font-Size="8pt" ValidationGroup="EditAddressGroup">
                                                                                <asp:ListItem Selected="True"></asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </span>
                                                                    </td>
                                                                    <td class="style2">
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="EditCountry"
                                                                            ErrorMessage="*" ValidationGroup="EditAddressGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Update" ImageUrl="~/Images/Icons/diskette.gif"
                                                                            ValidationGroup="EditAddressGroup" />&#160;&nbsp;<asp:ImageButton ID="NewAddressCancelBtn"
                                                                                runat="server" CommandName="Cancel" ImageUrl="~/Images/Icons/against.gif" CausesValidation="false"
                                                                                ToolTip="Cancel" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </EditItemTemplate>
                                                        <ItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        Address1:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="Address1Label" runat="server" Text='<%# Eval("Address1") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Address2:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:Label ID="Address2Label" runat="server" Text='<%# Eval("Address2") %>'></asp:Label></span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Street:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:Label ID="StreetLabel" runat="server" Text='<%# Eval("Street") %>'></asp:Label></span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        City:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:Label ID="CityLabel" runat="server" Text='<%# Eval("City") %>'></asp:Label></span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        PostCode:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:Label ID="PostCodeLabel" runat="server" Text='<%# Eval("PostCode") %>'></asp:Label></span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        State:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:Label ID="StateIdLabel" runat="server" Text='<%# Eval("Geo_AdministrativeDivision.DivisionName") %>'></asp:Label></span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Country:
                                                                    </td>
                                                                    <td>
                                                                        <span>
                                                                            <asp:Label ID="CountryIdLabel" runat="server" Text='<%# Eval("Geo_Country.CountryName") %>'></asp:Label></span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        DateCreated:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="DateCreatedTextBox" runat="server" Text='<%# Bind("DateCreated") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        CreatedBy:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="CreatedByTextBox" runat="server" Text='<%# Bind("CreatedBy") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        DateUpdated:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="DateUpdatedTextBox" runat="server" Text='<%# Bind("DateUpdated") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        UpdatedBy:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="UpdatedByTextBox" runat="server" Text='<%# Bind("UpdatedBy") %>' />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="BtnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                                                                            ImageUrl="~/Images/Icons/refresh.gif" ToolTip="Edit" />&#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <br />
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemSeparatorTemplate>
                                                            <div style="height: 5px; width: 100%; border-top: dashed 1px #ff0000; border-color: #D3D3D3;
                                                                border-top-style: solid; border-top-width: thin;">
                                                            </div>
                                                        </ItemSeparatorTemplate>
                                                    </asp:ListView>
                                                    <asp:LinqDataSource ID="ldsVenueAddresses" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        OnSelecting="ldsVenueAddresses_Selecting" TableName="Addresses" EnableInsert="True"
                                                        EnableUpdate="True">
                                                    </asp:LinqDataSource>
                                                    <asp:LinqDataSource ID="ldsCountry" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        Select="new (CountryName, CountryID)" TableName="Geo_Countries" OrderBy="CountryName">
                                                    </asp:LinqDataSource>
                                                    <asp:LinqDataSource ID="ldsGeo_States" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        TableName="Geo_AdministrativeDivisions">
                                                    </asp:LinqDataSource>
                                                </fieldset>
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="SelectedIndexChanged" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                    </div>
                                    <div class="yui-u">
                                        <asp:UpdatePanel ID="updtpnlVenueContacts" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <fieldset>
                                                    <legend>Categories</legend>
                                                    <asp:ListView ID="lvVenueCategories" runat="server" DataKeyNames="VenueCategoryId"
                                                        DataSourceID="ldsVenueCategories" InsertItemPosition="LastItem" OnItemInserting="lvVenueCatagories_ItemInserting">
                                                        <LayoutTemplate>
                                                            <div id="itemPlaceholderContainer" runat="server" style="">
                                                                <span id="itemPlaceholder" runat="server"></span>
                                                            </div>
                                                        </LayoutTemplate>
                                                        <InsertItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        <asp:Label ID="Label4" runat="server" BorderColor="#CCCCCC" Text="Add new category:"
                                                                            Font-Underline="True" ForeColor="Black"></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Category Name:
                                                                    </td>
                                                                    <td>
                                                                        <asp:DropDownList ID="CategoryNameDropDown" runat="server" DataSourceID="ldsCategories"
                                                                            DataTextField="CategoryName" DataValueField="CategoryId" Font-Size="8pt" Height="19px"
                                                                            Width="155px" ValidationGroup="InsertCategory">
                                                                            <asp:ListItem Selected="false"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                        <asp:RequiredFieldValidator ID="CategoryNameValidator1" runat="server" ControlToValidate="CategoryNameDropDown"
                                                                            ErrorMessage="*" ValidationGroup="InsertCategory"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        <asp:CustomValidator ID="DuplicateCategoryValidator" runat="server" ErrorMessage="This category has been already assigned!"></asp:CustomValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="BtnSave" runat="server" CommandName="Insert" ImageUrl="~/Images/Icons/diskette.gif"
                                                                            ToolTip="Save" CausesValidation="true" ValidationGroup="InsertCategory" />&#160;&nbsp;<asp:ImageButton
                                                                                ID="BtnCancel" runat="server" CommandName="Cancel" ImageUrl="~/Images/Icons/against.gif"
                                                                                ToolTip="Cancel" CausesValidation="False" ValidationGroup="InsertCategory" />
                                                                    </td>
                                                                    <td>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </InsertItemTemplate>
                                                        <EmptyDataTemplate>
                                                            <span>No categories associated with this venue.</span></EmptyDataTemplate>
                                                        <ItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                                                                            ImageAlign="Baseline" ImageUrl="~/Images/Icons/x.gif" ToolTip="Delete" ValidationGroup="insertCategory" />
                                                                        <ajaxToolkit:ConfirmButtonExtender ID="DeleteButton_ConfirmButtonExtender" runat="server"
                                                                            ConfirmText="Are you sure you want to delete this item?" Enabled="True" TargetControlID="DeleteButton">
                                                                        </ajaxToolkit:ConfirmButtonExtender>
                                                                        &#160;&#160;
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="CategoryNameLabel" runat="server" Text='<%# Eval("Category.CategoryName") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="2">
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemSeparatorTemplate>
                                                            <div style="height: 5px; width: 100%; border-top: dashed 1px #ff0000; border-color: #D3D3D3;
                                                                border-top-style: solid; border-top-width: thin;">
                                                            </div>
                                                        </ItemSeparatorTemplate>
                                                    </asp:ListView>
                                                    <asp:LinqDataSource ID="ldsDivisions" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        TableName="Divisions" Where="IsActive == true" OrderBy="DivisionName">
                                                    </asp:LinqDataSource>
                                                    <asp:LinqDataSource ID="ldsCategories" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        TableName="Categories" Where="IsActive == true" OrderBy="CategoryName">
                                                        <WhereParameters>
                                                            <asp:Parameter Name="IsActive" Type="Boolean" />
                                                        </WhereParameters>
                                                    </asp:LinqDataSource>
                                                    <asp:LinqDataSource ID="ldsVenueCategories" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        EnableDelete="True" EnableInsert="True" OnSelecting="ldsVenueCategories_Selecting"
                                                        TableName="VenueCategories">
                                                    </asp:LinqDataSource>
                                                </fieldset>
                                                <fieldset>
                                                    <legend>Units</legend>
                                                    <asp:ListView ID="lvVenueUnits" runat="server" DataKeyNames="VenueUnitId" DataSourceID="ldsVenueUnits"
                                                        InsertItemPosition="LastItem" OnItemInserting="lvVenueUnits_ItemInserting">
                                                        <LayoutTemplate>
                                                            <div id="itemPlaceholderContainer" runat="server" style="">
                                                                <span id="itemPlaceholder" runat="server"></span>
                                                            </div>
                                                        </LayoutTemplate>
                                                        <InsertItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        <asp:Label ID="Label4" runat="server" BorderColor="#CCCCCC" Text="Add new unit:"
                                                                            Font-Underline="True" ForeColor="Black"></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Unit:
                                                                    </td>
                                                                    <td>
                                                                        <asp:DropDownList ID="UnitDropDown" runat="server" DataSourceID="ldsUnits" DataTextField="UnitCode"
                                                                            DataValueField="UnitId" Font-Size="8pt" Height="19px" Width="155px" ValidationGroup="InsertUnitGroup">
                                                                            <asp:ListItem Selected="false"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                        <asp:RequiredFieldValidator ID="CategoryNameValidator1" runat="server" ControlToValidate="UnitDropDown"
                                                                            ErrorMessage="*" ValidationGroup="InsertUnitGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Campus:
                                                                    </td>
                                                                    <td>
                                                                        <asp:DropDownList ID="CampusDropDown" runat="server" DataSourceID="ldsCampus" DataTextField="CampusCode"
                                                                            DataValueField="CampusId" Font-Size="8pt" Height="19px" Width="155px" ValidationGroup="InsertUnitGroup">
                                                                            <asp:ListItem Selected="false"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" ControlToValidate="CampusDropDown"
                                                                            ErrorMessage="*" ValidationGroup="InsertUnitGroup"></asp:RequiredFieldValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        <asp:CustomValidator ID="DuplicateUnitValidator" runat="server" ErrorMessage="This unit has been already assigned!"></asp:CustomValidator>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="style2">
                                                                        <asp:ImageButton ID="NewUnitSaveBtn" runat="server" CommandName="Insert" ImageUrl="~/Images/Icons/diskette.gif"
                                                                            ToolTip="Insert" ValidationGroup="InsertUnitGroup" />&#160;&nbsp;<asp:LinkButton
                                                                                ID="NewUnitCancelBtn" runat="server" CommandName="Cancel" ImageUrl="~/Images/Icons/against.gif"
                                                                                CausesValidation="false" ToolTip="Cancel" ValidationGroup="InsertUnitGroup" />
                                                                    </td>
                                                                    <td class="style2">
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </InsertItemTemplate>
                                                        <EmptyDataTemplate>
                                                            <span>No data was returned.</span></EmptyDataTemplate>
                                                        <ItemTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Unit:
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="UnitIdLabel" runat="server" Text='<%# Eval("Unit.UnitCode") %>' ToolTip='<%# Eval("Unit.UnitName") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        Campus:&#160;
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label ID="CampusIdLabel" runat="server" Text='<%# Eval("Campus.CampusCode") %>'
                                                                            ToolTip='<%# Eval("Campus.CampusName") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                    <td>
                                                                        &#160;&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                                                                            ImageUrl="~/Images/Icons/x.gif" ToolTip="Delete" ValidationGroup="deleteUnit" />
                                                                        <ajaxToolkit:ConfirmButtonExtender ID="DeleteButton_ConfirmButtonExtender" runat="server"
                                                                            ConfirmText="Are you sure you want to delete this item?" Enabled="True" TargetControlID="DeleteButton">
                                                                        </ajaxToolkit:ConfirmButtonExtender>
                                                                    </td>
                                                                    <td>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemSeparatorTemplate>
                                                            <div style="height: 5px; width: 100%; border-top: dashed 1px #ff0000; border-color: #D3D3D3;
                                                                border-top-style: solid; border-top-width: thin;">
                                                            </div>
                                                        </ItemSeparatorTemplate>
                                                    </asp:ListView>
                                                    <asp:LinqDataSource ID="ldsUnits" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        TableName="Units" Where="IsActive == true" OrderBy="UnitCode">
                                                    </asp:LinqDataSource>
                                                    <asp:LinqDataSource ID="ldsVenueUnits" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        EnableDelete="True" EnableInsert="True" OnSelecting="ldsVenueUnits_Selecting"
                                                        TableName="VenueUnits">
                                                    </asp:LinqDataSource>
                                                    <asp:LinqDataSource ID="ldsCampus" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                        TableName="Campus" Where="IsActive == true" OrderBy="CampusCode">
                                                    </asp:LinqDataSource>
                                                </fieldset>
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="SelectedIndexChanged" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                    </div>
                                </div>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel HeaderText="Contacts" ID="tbpnlContacts" runat="server">
                            <HeaderTemplate>
                                Contacts
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:ListView ID="lvVenueContacts" runat="server" DataKeyNames="ContactId" DataSourceID="ldsVenueContacts"
                                            InsertItemPosition="LastItem" OnItemInserting="lvVenueContacts_ItemInserting"
                                            OnItemDataBound="lvVenueContacts_ItemDataBound" OnItemUpdating="lvVenueContacts_ItemUpdating">
                                            <LayoutTemplate>
                                                <div id="itemPlaceholderContainer" runat="server" style="">
                                                    <span id="itemPlaceholder" runat="server"></span>
                                                </div>
                                                <div style="">
                                                </div>
                                            </LayoutTemplate>
                                            <InsertItemTemplate>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            First Name:
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>'
                                                                ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="FirstNameTextBox"
                                                                ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                        </td>
                                                        <tr>
                                                            <td>
                                                                Last Name:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="LastNameTextBox" runat="server" Text='<%# Bind("LastName") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="LastNameTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Title:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator23" runat="server" ControlToValidate="TitleTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                JobTitle:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="JobTitleTextBox" runat="server" Text='<%# Bind("JobTitle") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ControlToValidate="JobTitleTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                EmailAddress:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="EmailAddressTextBox" runat="server" Text='<%# Bind("EmailAddress") %>'
                                                                    ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator25" runat="server" ControlToValidate="EmailAddressTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Is Agency:
                                                            </td>
                                                            <td>
                                                                <asp:CheckBox ID="IsAgencyCheckBox" runat="server" Checked='<%# Bind("IsAgency") %>' />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Is Educator:
                                                            </td>
                                                            <td>
                                                                <asp:CheckBox ID="IsEducatorCheckBox" runat="server" Checked='<%# Bind("IsEducator") %>' />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                EducatorType:
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="EducatorTypeDropDown" runat="server" DataSourceID="ldsEducatorTypes"
                                                                    DataTextField="EducatorTypeName" DataValueField="EducatorTypeId" Font-Size="8pt"
                                                                    Height="19px" ValidationGroup="InsertContactGroup" Width="155px">
                                                                    <asp:ListItem></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                EducatorCurrentRate:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="EducatorCurrentRateTextBox" runat="server" Text='<%# Bind("EducatorCurrentRate") %>'
                                                                    ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator26" runat="server" ControlToValidate="EducatorCurrentRateTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Division:
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="DivisionDropDown" runat="server" DataSourceID="ldsVenueContactDivisions"
                                                                    DataTextField="DivisionName" DataValueField="DivisionId" Font-Size="8pt" Height="19px"
                                                                    ValidationGroup="InsertAddressGroup" Width="155px">
                                                                    <asp:ListItem></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                <asp:Label ID="Label4" runat="server" BorderColor="#CCCCCC" Font-Underline="True"
                                                                    ForeColor="Black" Text="Address:"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Address1:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="Address1TextBox" runat="server" Text='<%# Bind("Address1") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Address1TextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Address2:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="Address2TextBox" runat="server" Text='<%# Bind("Address2") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Address2TextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Street:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="StreetTextBox" runat="server" Text='<%# Bind("Street") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="StreetTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                City:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="CityTextBox" runat="server" Text='<%# Bind("City") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="CityTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                PostCode:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="PostCodeTextBox" runat="server" Text='<%# Bind("PostCode") %>' ValidationGroup="InsertContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="PostCodeTextBox"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                State:
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="States" runat="server" DataSourceID="ldsVenueContactStates"
                                                                    DataTextField="DivisionName" DataValueField="AdministrativeDivisionID" Font-Size="8pt"
                                                                    Height="19px" ValidationGroup="InsertContactGroup" Width="155px">
                                                                    <asp:ListItem Selected="True"></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="States"
                                                                    ErrorMessage="*" ValidationGroup="InsertContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Country:
                                                            </td>
                                                            <td>
                                                                <span>
                                                                    <asp:DropDownList ID="Countries" runat="server" DataSourceID="ldsVenueContactCountries"
                                                                        DataTextField="CountryName" DataValueField="CountryID" Font-Size="8pt" Height="19px"
                                                                        ValidationGroup="InsertAddressGroup" Width="155px">
                                                                        <asp:ListItem Selected="True"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="Countries"
                                                                        ErrorMessage="*" ValidationGroup="InsertAddressGroup"></asp:RequiredFieldValidator>
                                                                </span>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="Valid Rate Required"
                                                                    ControlToValidate="EducatorCurrentRateTextBox" ValidationGroup="InsertContactGroup"
                                                                    ValidationExpression="^\$?\d+(\.(\d{2}))?$"></asp:RegularExpressionValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="EmailAddressTextBox"
                                                                    ErrorMessage="Valid Email Address is Required(*)" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator><br />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="style2">
                                                                <asp:ImageButton ID="NewContactSaveBtn" runat="server" CommandName="Insert" ImageUrl="~/Images/Icons/diskette.gif"
                                                                    CausesValidation="true" ToolTip="Insert" ValidationGroup="InsertContactGroup" />
                                                                &nbsp;&nbsp;
                                                                <asp:ImageButton ID="NewContactCancelBtn" runat="server" CausesValidation="False"
                                                                    CommandName="Cancel" ImageUrl="~/Images/Icons/against.gif" ToolTip="Cancel" ValidationGroup="InsertContactGroup" />
                                                            </td>
                                                            <td>
                                                            </td>
                                                        </tr>
                                                </table>
                                            </InsertItemTemplate>
                                            <EditItemTemplate>
                                                <table>
                                                    <tr>
                                                        <td colspan="2">
                                                            <asp:HiddenField ID="ContactIdHiddenField" runat="server" Value='<%# Eval("ContactId") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            First Name:
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>'
                                                                ValidationGroup="EditContactGroup"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="FirstNameTextBox"
                                                                ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                        </td>
                                                        <tr>
                                                            <td>
                                                                Last Name:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="LastNameTextBox" runat="server" Text='<%# Bind("LastName") %>' ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ControlToValidate="LastNameTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Title:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" ControlToValidate="TitleTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                JobTitle:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="JobTitleTextBox" runat="server" Text='<%# Bind("JobTitle") %>' ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" ControlToValidate="JobTitleTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                EmailAddress:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="EmailAddressTextBox" runat="server" Text='<%# Bind("EmailAddress") %>'
                                                                    ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" ControlToValidate="LastNameTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Is Agency:
                                                            </td>
                                                            <td>
                                                                <asp:CheckBox ID="IsAgencyCheckBox" runat="server" Checked='<%# Bind("IsAgency") %>' />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Is Educator:
                                                            </td>
                                                            <td>
                                                                <asp:CheckBox ID="IsEducatorCheckBox" runat="server" Checked='<%# Bind("IsEducator") %>' />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                EducatorType:
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="EducatorTypeDropDown" runat="server" DataSourceID="ldsEducatorTypes"
                                                                    DataTextField="EducatorTypeName" DataValueField="EducatorTypeId" Font-Size="8pt"
                                                                    Height="19px" ValidationGroup="EditContactGroup" Width="155px">
                                                                    <asp:ListItem></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                EducatorCurrentRate:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="EducatorCurrentRateTextBox" runat="server" Text='<%# Bind("EducatorCurrentRate") %>'
                                                                    ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator21" runat="server" ControlToValidate="EducatorCurrentRateTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Division:
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="DivisionDropDown" runat="server" DataSourceID="ldsVenueContactDivisions"
                                                                    DataTextField="DivisionName" DataValueField="DivisionId" Font-Size="8pt" Height="19px"
                                                                    ValidationGroup="EditContactGroup" Width="155px">
                                                                    <asp:ListItem></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                <asp:Label ID="Label4" runat="server" BorderColor="#CCCCCC" Font-Underline="True"
                                                                    ForeColor="Black" Text="Address:"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Address1:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="Address1TextBox" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Address1") %>'
                                                                    ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Address1TextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Address2:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="Address2TextBox" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Address2")%>'
                                                                    ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Address2TextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Street:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="StreetTextBox" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Street")%>'
                                                                    ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="StreetTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                City:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="CityTextBox" runat="server" Text='<%# Eval("ContactAddresses[0].Address.City")%>'
                                                                    ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="CityTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                PostCode:
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="PostCodeTextBox" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Address2")%>'
                                                                    ValidationGroup="EditContactGroup"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="PostCodeTextBox"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                State:
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="States" runat="server" DataSourceID="ldsVenueContactStates"
                                                                    DataTextField="DivisionName" DataValueField="AdministrativeDivisionID" Font-Size="8pt"
                                                                    Height="19px" ValidationGroup="EditContactGroup" Width="155px">
                                                                    <asp:ListItem Selected="True"></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="States"
                                                                    ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Country:
                                                            </td>
                                                            <td>
                                                                <span>
                                                                    <asp:DropDownList ID="Countries" runat="server" DataSourceID="ldsVenueContactCountries"
                                                                        SelectedValue='<%# Eval("ContactAddresses[0].Address.CountryId")%>' DataTextField="CountryName"
                                                                        DataValueField="CountryID" Font-Size="8pt" Height="19px" ValidationGroup="InsertAddressGroup"
                                                                        Width="155px">
                                                                        <asp:ListItem Selected="True"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="Countries"
                                                                        ErrorMessage="*" ValidationGroup="EditContactGroup"></asp:RequiredFieldValidator>
                                                                </span>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="Valid Rate Required!"
                                                                    ControlToValidate="EducatorCurrentRateTextBox" ValidationGroup="EditContactGroup"
                                                                    ValidationExpression="^\d+(?:\.\d{0,2})?$"></asp:RegularExpressionValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="EmailAddressTextBox"
                                                                    ErrorMessage="Valid Email Address is Required(*)" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                                    ValidationGroup="EditContactGroup"></asp:RegularExpressionValidator><br />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="style2">
                                                                <asp:ImageButton ID="contactEditSaveBtn" runat="server" CommandName="Update" ImageUrl="~/Images/Icons/diskette.gif"
                                                                    CausesValidation="true" ToolTip="Update" ValidationGroup="EditContactGroup" />
                                                                &nbsp;&nbsp;
                                                                <asp:ImageButton ID="contactEditCancelBtn" runat="server" CausesValidation="False"
                                                                    CommandName="Cancel" ImageUrl="~/Images/Icons/against.gif" ToolTip="Cancel" ValidationGroup="InsertContactGroup" />
                                                            </td>
                                                            <td>
                                                            </td>
                                                        </tr>
                                                </table>
                                            </EditItemTemplate>
                                            <EmptyDataTemplate>
                                                <span>No data was returned.</span>
                                            </EmptyDataTemplate>
                                            <ItemTemplate>
                                                <table>
                                                    <tr>
                                                        <td colspan="2">
                                                            <asp:HiddenField ID="ContactIdHiddenField" runat="server" Value='<%# Eval("ContactId") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            First Name:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Last Name:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Title:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            JobTitle:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="JobTitleLabel" runat="server" Text='<%# Eval("JobTitle") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            EmailAddress:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="EmailAddressLabel" runat="server" Text='<%# Eval("EmailAddress") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Is Agency:
                                                        </td>
                                                        <td>
                                                            <asp:CheckBox ID="IsAgencyCheckBox" runat="server" Checked='<%# Eval("IsAgency") %>'
                                                                Enabled="false" Text="" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Is Educator:
                                                        </td>
                                                        <td>
                                                            <asp:CheckBox ID="IsEducatorCheckBox" runat="server" Checked='<%# Eval("IsEducator") %>'
                                                                Enabled="false" Text="" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            EducatorType:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="EducatorTypeLabel" runat="server" Text='<%# Eval("EducatorType.EducatorTypeName") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            EducatorCurrentRate:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="EducatorCurrentRateLabel" runat="server" Text='<%# Eval("EducatorCurrentRate") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Division:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="DivisionIdLabel" runat="server" Text='<%# Eval("Division.DivisionName") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            Address Details:
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Address1:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="AddressLabel" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Address1") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Address2:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label5" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Address1") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Street:
                                                        </td>
                                                        <td>
                                                            <span>
                                                                <asp:Label ID="StreetLabel" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Street") %>'></asp:Label></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            City:
                                                        </td>
                                                        <td>
                                                            <span>
                                                                <asp:Label ID="CityLabel" runat="server" Text='<%# Eval("ContactAddresses[0].Address.City") %>'></asp:Label></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            PostCode:
                                                        </td>
                                                        <td>
                                                            <span>
                                                                <asp:Label ID="PostCodeLabel" runat="server" Text='<%# Eval("ContactAddresses[0].Address.PostCode") %>'></asp:Label></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            State:
                                                        </td>
                                                        <td>
                                                            <span>
                                                                <asp:Label ID="StateIdLabel" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Geo_AdministrativeDivision.DivisionName") %>'></asp:Label></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Country:
                                                        </td>
                                                        <td>
                                                            <span>
                                                                <asp:Label ID="CountryIdLabel" runat="server" Text='<%# Eval("ContactAddresses[0].Address.Geo_Country.CountryName") %>'></asp:Label></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <fieldset>
                                                                <asp:ListView ID="lvContactContactNumbers" runat="server" OnItemInserting="lvContactContactNumbers_ItemInserting"
                                                                    DataKeyNames="ContactContactNumberId" InsertItemPosition="LastItem" DataSourceID="ldsContactContactNumber">
                                                                    <LayoutTemplate>
                                                                        <div id="itemPlaceholderContainer" runat="server" style="">
                                                                            <span id="itemPlaceholder" runat="server"></span>
                                                                            <asp:HiddenField ID="contactNumbersContactId" runat="server" Value="22" />
                                                                        </div>
                                                                    </LayoutTemplate>
                                                                    <InsertItemTemplate>
                                                                        <table>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                    &nbsp;
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                    <asp:Label ID="Label4" runat="server" BorderColor="#CCCCCC" Font-Underline="True"
                                                                                        ForeColor="Black" Text="Add contact numbers:"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                    &nbsp;&nbsp;
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    Contact Number:
                                                                                </td>
                                                                                <td>
                                                                                    <asp:TextBox ID="ContactNumberTextBox" runat="server" Text='<%# Bind("ContactNumberValue") %>'></asp:TextBox>
                                                                                    <asp:CustomValidator ID="ContactNumberValidator" runat="server" ErrorMessage="*"
                                                                                        ValidationGroup="InsertContactNumberGroup" ClientValidationFunction="CheckContactNumberValueRequiredFieldValidator"></asp:CustomValidator>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    Contact Type:
                                                                                </td>
                                                                                <td>
                                                                                    <asp:DropDownList ID="ContactTypeDropDown" runat="server" DataSourceID="ldsContactNumberTypes"
                                                                                        DataTextField="ContactNumberTypeName" DataValueField="ContactNumberTypeId" Font-Size="8pt"
                                                                                        Height="19px" ValidationGroup="InsertCategory" Width="155px">
                                                                                        <asp:ListItem Selected="false"></asp:ListItem>
                                                                                    </asp:DropDownList>
                                                                                    <asp:RequiredFieldValidator ID="ContactNumberTypeValidator" runat="server" ControlToValidate="ContactTypeDropDown"
                                                                                        ErrorMessage="*" ValidationGroup="InsertContactNumberGroup"></asp:RequiredFieldValidator>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                    <asp:CustomValidator ID="DuplicateCategoryValidator" runat="server" ErrorMessage="This category has been already assigned!"
                                                                                        ValidationGroup="InsertContactNumberGroup"></asp:CustomValidator>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:ImageButton ID="BtnSave" runat="server" CausesValidation="true" CommandName="Insert"
                                                                                        ImageUrl="~/Images/Icons/diskette.gif" ToolTip="Save" />
                                                                                    &nbsp;&nbsp;
                                                                                    <asp:ImageButton ID="BtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                                                                        ImageUrl="~/Images/Icons/against.gif" ToolTip="Cancel" />
                                                                                </td>
                                                                                <td>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </InsertItemTemplate>
                                                                    <ItemTemplate>
                                                                        <table>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                    &nbsp;&nbsp;
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:ImageButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                                                                                        ImageAlign="Baseline" ImageUrl="~/Images/Icons/x.gif" ToolTip="Delete" ValidationGroup="insertCategory" />
                                                                                    &nbsp;
                                                                                    <ajaxToolkit:ConfirmButtonExtender ID="DeleteButton_ConfirmButtonExtender" runat="server"
                                                                                        ConfirmText="Are you sure you want to delete this item?" Enabled="True" TargetControlID="DeleteButton">
                                                                                    </ajaxToolkit:ConfirmButtonExtender>
                                                                                </td>
                                                                                <td style="table-layout: fixed">
                                                                                    <asp:Label ID="ContactTypeNameLabel" runat="server" Text='<%# Eval("ContactNumber.ContactNumberType.ContactNumberTypeName") %>'></asp:Label>:
                                                                                    &nbsp;
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label ID="ContactNumberValueLabel" runat="server" Text='<%# Eval("ContactNumber.ContactNumberValue") %>'></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td colspan="2">
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </ItemTemplate>
                                                                </asp:ListView>
                                                                <asp:LinqDataSource ID="ldsContactContactNumber" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                                    TableName="ContactContactNumbers" EnableDelete="True" EnableInsert="True" Where="ContactId == @ContactId">
                                                                    <WhereParameters>
                                                                        <asp:ControlParameter Name="ContactId" Type="Int32" ControlID="ContactIdHiddenField"
                                                                            PropertyName="Value" />
                                                                    </WhereParameters>
                                                                </asp:LinqDataSource>
                                                                <asp:LinqDataSource ID="ldsContactNumberTypes" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                                                    TableName="ContactNumberTypes">
                                                                </asp:LinqDataSource>
                                                            </fieldset>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:ImageButton ID="BtnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                                                                ImageUrl="~/Images/Icons/refresh.gif" ToolTip="Edit" />&#160;&nbsp;
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                            <ItemSeparatorTemplate>
                                                <div style="height: 5px; width: 100%; border-top: dashed 1px #ff0000; border-color: #D3D3D3;
                                                    border-top-style: solid; border-top-width: thin;">
                                                </div>
                                            </ItemSeparatorTemplate>
                                        </asp:ListView>
                                        <asp:LinqDataSource ID="ldsVenueContacts" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            EnableDelete="True" EnableInsert="True" EnableUpdate="True" OnSelecting="ldsVenueContacts_Selecting"
                                            TableName="Contacts">
                                        </asp:LinqDataSource>
                                        <asp:LinqDataSource ID="ldsVenueContactDivisions" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            TableName="Divisions" Where="IsActive == true">
                                        </asp:LinqDataSource>
                                        <asp:LinqDataSource ID="ldsVenueContactCountries" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            Select="new (CountryName, CountryID)" TableName="Geo_Countries">
                                        </asp:LinqDataSource>
                                        <asp:LinqDataSource ID="ldsVenueContactStates" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            TableName="Geo_AdministrativeDivisions">
                                        </asp:LinqDataSource>
                                        <asp:LinqDataSource ID="ldsEducatorTypes" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            TableName="EducatorTypes">
                                        </asp:LinqDataSource>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="DataBound" />
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel HeaderText="Notes" ID="tbpnlNotes" runat="server">
                            <HeaderTemplate>
                                Notes
                            </HeaderTemplate>
                            <ContentTemplate>
                                Notes
                                <asp:UpdatePanel ID="UpdatePnlNotes" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:GridView ID="gvNotes" runat="server" AutoGenerateColumns="False" EmptyDataText="No notes have been added for this venue."
                                            ShowFooter="true" ShowHeader="False" SkinID="Notes" Width="90%" DataKeyNames="NoteId"
                                            OnRowUpdating="gvNotes_RowUpdating" AllowSorting="True" DataSourceID="ldsComments"
                                            Style="margin-right: 112px">
                                            <Columns>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <hr style="height: 1px" />
                                                        <p>
                                                            Created On:
                                                            <asp:Label ID="lblCommentDateCreated" runat="server" Text='<%# Bind("DateCreated") %>'></asp:Label>
                                                            By:
                                                            <asp:Label ID="lblCommentCreatedBy" runat="server" Text='<%# Bind("CreatedBy") %>'></asp:Label>
                                                            <br />
                                                            Last Updated On:
                                                            <asp:Label ID="lblCommentDateUpdated" runat="server" Text='<%# Bind("DateUpdated") %>'></asp:Label>
                                                            By:
                                                            <asp:Label ID="lblCommentUpdatedBy" runat="server" Text='<%# Bind("UpdatedBy") %>'></asp:Label>
                                                        </p>
                                                        <br />
                                                        Comment:
                                                        <asp:Label ID="lblComment" runat="server" Text='<%# Bind("NoteText") %>'></asp:Label>
                                                        <br />
                                                        <br />
                                                        <asp:ImageButton ID="BtnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                                                            ImageUrl="~/Images/Icons/refresh.gif" ToolTip="Edit" />&#160;&nbsp;
                                                        <asp:ImageButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                                                            ImageAlign="Baseline" ImageUrl="~/Images/Icons/x.gif" ToolTip="Delete" ValidationGroup="insertCategory" />
                                                        &nbsp;
                                                        <ajaxToolkit:ConfirmButtonExtender ID="cbeDeleteNote" runat="server" ConfirmText="Are you sure that you want to delete this note?"
                                                            TargetControlID="DeleteButton">
                                                        </ajaxToolkit:ConfirmButtonExtender>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txtEditNote" runat="server" Height="80px" MaxLength="8000" TextMode="MultiLine"
                                                            Width="90%" Text='<%# Bind("NoteText") %>'></asp:TextBox><br />
                                                        <asp:ImageButton ID="Updatebtn" runat="server" CommandName="Update" ImageUrl="~/Images/Icons/diskette.gif"
                                                            CausesValidation="false" ToolTip="Update" />
                                                        &nbsp;&nbsp;
                                                        <asp:ImageButton ID="CancelBtn" runat="server" CausesValidation="False" CommandName="Cancel"
                                                            ImageUrl="~/Images/Icons/against.gif" ToolTip="Cancel" />
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                    </FooterTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                        <br />
                                        <p style="cursor: hand">
                                            <img alt="" src="../Images/Icons/plus.gif" onclick="showAddNote();" /></p>
                                        <div style="display: none;" id="divAddNote">
                                            <fieldset id="fldAddNote">
                                                <legend id="lgdAddNote">Add Note</legend>
                                                <asp:UpdatePanel ID="updtpnlNewNote" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <asp:TextBox ID="txtAddNewNote" runat="server" Height="80px" MaxLength="8000" TextMode="MultiLine"
                                                            Width="90%"></asp:TextBox><br />
                                                        <p style="cursor: hand">
                                                            <asp:ImageButton ID="SaveBtn" runat="server" OnClick="btnSaveNote_Click" ImageUrl="~/Images/Icons/diskette.gif"
                                                                CausesValidation="false" ToolTip="Save" />
                                                            <img alt="" src="../Images/Icons/against.gif" title="Cancel" onclick="hideAddNote();" /></p>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </fieldset>
                                        </div>
                                        <asp:LinqDataSource ID="ldsComments" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            EnableDelete="True" EnableInsert="True" EnableUpdate="True" TableName="Notes"
                                            OnSelecting="ldsComments_Selecting">
                                        </asp:LinqDataSource>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="DataBound" />
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel HeaderText="Current Placement" ID="tbpnlCurrentPlacement" runat="server">
                            <HeaderTemplate>
                                Current Placement
                            </HeaderTemplate>
                            <ContentTemplate>
                                Current Placements
                                <asp:UpdatePanel ID="updtpnlCurrentPlacements" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:GridView ID="gvCurrentPlacements" runat="server" AutoGenerateColumns="False"
                                            DataKeyNames="PlacementTypeId" DataSourceID="ldsCurrentPlacements" EmptyDataText="There are no current placements with this venue."
                                            SkinID="Results" AllowSorting="True" OnRowDataBound="gvCurrentPlacements_RowDataBound">
                                            <Columns>
                                                <asp:BoundField DataField="DateStart" HeaderText="Start" SortExpression="DateStart"
                                                    DataFormatString="{0:d}" />
                                                <asp:BoundField DataField="DateEnd" HeaderText="End" SortExpression="DateEnd" DataFormatString="{0:d}" />
                                                <asp:BoundField DataField="PlacementTypeName" HeaderText="Name" SortExpression="PlacementTypeName" />
                                                <asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" />
                                                <asp:BoundField DataField="SemesterId" HeaderText="Sem" SortExpression="SemesterId" />
                                                <asp:BoundField DataField="UnitCode" HeaderText="Unit" SortExpression="UnitCode" />
                                                <asp:BoundField DataField="CampusCode" HeaderText="Campus" SortExpression="CampusCode" />
                                                <asp:BoundField DataField="CategoryName" HeaderText="Category" SortExpression="CategoryName" />
                                                <asp:BoundField DataField="AttendancePatternId" HeaderText="Attendance Pattern "
                                                    SortExpression="AttendancePatternId" />
                                                <asp:BoundField DataField="RequiredHours" HeaderText="Req Hours" SortExpression="Required Hours" />
                                                <asp:TemplateField HeaderText="Allocations" SortExpression="Allocations">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Allocations") %>'></asp:TextBox></EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Allocations") %>'></asp:Label><asp:HiddenField
                                                            ID="hfPlacementTypeId" runat="server" Value='<%# Eval("PlacementTypeId") %>' />
                                                        <asp:GridView ID="gvAllocatedStudents" runat="server" BackColor="White" BorderColor="#CCCCCC"
                                                            BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal"
                                                            AutoGenerateColumns="False" Width="270px">
                                                            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                                                            <Columns>
                                                                <asp:BoundField DataField="LastName" HeaderText="Last Name" />
                                                                <asp:BoundField DataField="FirstName" HeaderText="First Name" />
                                                                <asp:BoundField DataField="IdNumber" HeaderText="ID Number" />
                                                            </Columns>
                                                            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                                                            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                                                            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                                                        </asp:GridView>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                        <asp:LinqDataSource ID="ldsCurrentPlacements" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            OnSelecting="ldsCurrentPlacements_Selecting" TableName="PlacementTypes">
                                        </asp:LinqDataSource>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="DataBound" />
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel HeaderText="Past Placements" ID="tbpnlPastPlacement" runat="server">
                            <HeaderTemplate>
                                Past Placements
                            </HeaderTemplate>
                            <ContentTemplate>
                                Past Placements<br />
                                <asp:UpdatePanel ID="updtpnlPastPlacements" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:GridView ID="gvPastPlacements" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                            DataKeyNames="PlacementTypeId" DataSourceID="ldsPastPlacements" EmptyDataText="There are no past placements with this venue."
                                            OnRowDataBound="gvPastPlacements_RowDataBound" SkinID="Results">
                                            <Columns>
                                                <asp:BoundField DataField="DateStart" DataFormatString="{0:d}" HeaderText="Start"
                                                    SortExpression="DateStart" />
                                                <asp:BoundField DataField="DateEnd" DataFormatString="{0:d}" HeaderText="End" SortExpression="DateEnd" />
                                                <asp:BoundField DataField="PlacementTypeName" HeaderText="Name" SortExpression="PlacementTypeName" />
                                                <asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" />
                                                <asp:BoundField DataField="SemesterId" HeaderText="Sem" SortExpression="SemesterId" />
                                                <asp:BoundField DataField="UnitCode" HeaderText="Unit" SortExpression="UnitCode" />
                                                <asp:BoundField DataField="CampusCode" HeaderText="Campus" SortExpression="CampusCode" />
                                                <asp:BoundField DataField="CategoryName" HeaderText="Category" SortExpression="CategoryName" />
                                                <asp:BoundField DataField="AttendancePatternId" HeaderText="Attendance Pattern "
                                                    SortExpression="AttendancePatternId" />
                                                <asp:BoundField DataField="RequiredHours" HeaderText="Req Hours" SortExpression="Required Hours" />
                                                <asp:TemplateField HeaderText="Allocations" SortExpression="Allocations">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Allocations") %>'></asp:TextBox></EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("Allocations") %>'></asp:Label><asp:HiddenField
                                                            ID="hfPlacementTypeId0" runat="server" Value='<%# Eval("PlacementTypeId") %>' />
                                                        <asp:GridView ID="gvPastAllocatedStudents" runat="server" BackColor="White" BorderColor="#CCCCCC"
                                                            BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal"
                                                            AutoGenerateColumns="False">
                                                            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                                                            <Columns>
                                                                <asp:BoundField DataField="LastName" HeaderText="Last Name" />
                                                                <asp:BoundField DataField="FirstName" HeaderText="First Name" />
                                                                <asp:BoundField DataField="IdNumber" HeaderText="ID Number" />
                                                            </Columns>
                                                            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                                                            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                                                            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                                                        </asp:GridView>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                        <asp:LinqDataSource ID="ldsPastPlacements" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            OnSelecting="ldsPastPlacements_Selecting" TableName="PlacementTypes">
                                        </asp:LinqDataSource>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="DataBound" />
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel HeaderText="Future Placements" ID="tbpnlFuturePlacement" runat="server">
                            <HeaderTemplate>
                                Future Placements
                            </HeaderTemplate>
                            <ContentTemplate>
                                Future Placements
                                <asp:UpdatePanel ID="updtpnlFuturePlacements" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:GridView ID="gvFuturePlacements" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                            DataKeyNames="PlacementTypeId" DataSourceID="ldsFuturePlacements" EmptyDataText="There are no future placements with this venue."
                                            OnRowDataBound="gvFuturePlacements_RowDataBound" SkinID="Results">
                                            <Columns>
                                                <asp:BoundField DataField="DateStart" DataFormatString="{0:d}" HeaderText="Start"
                                                    SortExpression="DateStart" />
                                                <asp:BoundField DataField="DateEnd" DataFormatString="{0:d}" HeaderText="End" SortExpression="DateEnd" />
                                                <asp:BoundField DataField="PlacementTypeName" HeaderText="Name" SortExpression="PlacementTypeName" />
                                                <asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" />
                                                <asp:BoundField DataField="SemesterId" HeaderText="Sem" SortExpression="SemesterId" />
                                                <asp:BoundField DataField="UnitCode" HeaderText="Unit" SortExpression="UnitCode" />
                                                <asp:BoundField DataField="CampusCode" HeaderText="Campus" SortExpression="CampusCode" />
                                                <asp:BoundField DataField="CategoryName" HeaderText="Category" SortExpression="CategoryName" />
                                                <asp:BoundField DataField="AttendancePatternId" HeaderText="Attendance Pattern "
                                                    SortExpression="AttendancePatternId" />
                                                <asp:BoundField DataField="RequiredHours" HeaderText="Req Hours" SortExpression="Required Hours" />
                                                <asp:TemplateField HeaderText="Allocations" SortExpression="Allocations">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Allocations") %>'></asp:TextBox></EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("Allocations") %>'></asp:Label><br />
                                                        <asp:HiddenField ID="hfFuturePlacementTypeId" runat="server" Value='<%# Eval("PlacementTypeId") %>' />
                                                        <asp:GridView ID="gvFutureAllocatedStudents" runat="server" BackColor="White" BorderColor="#CCCCCC"
                                                            BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal"
                                                            AutoGenerateColumns="False" Width="257px">
                                                            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                                                            <Columns>
                                                                <asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="LastName" />
                                                                <asp:BoundField DataField="FirstName" HeaderText="First Name" />
                                                                <asp:BoundField DataField="IdNumber" HeaderText="ID Number" />
                                                            </Columns>
                                                            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                                                            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                                                            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                                                        </asp:GridView>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                        <asp:LinqDataSource ID="ldsFuturePlacements" runat="server" ContextTypeName="PlacementManagerLinqDataContext"
                                            OnSelecting="ldsFuturePlacements_Selecting" TableName="PlacementTypes">
                                        </asp:LinqDataSource>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="DataBound" />
                                        <asp:AsyncPostBackTrigger ControlID="gvVenues" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                    </ajaxToolkit:TabContainer>
                </div>
            </div>
        </div>
        <div id="ft">
            &nbsp;
        </div>
    </div>
    </form>
    <%--  <script type="text/javascript">

(function() {
    var Dom = YAHOO.util.Dom,
        Event = YAHOO.util.Event;

    Event.onDOMReady(function() {
        var layout = new YAHOO.widget.Layout({
            units: [
                
                { position: 'top', height: 50, resize: true, body: 'hd',  gutter: '5px', collapse: true, resize: true },
                { position: 'right', header: 'Help', width: 300, resize: true, gutter: '5px', footer: 'Footer', collapse: true, scroll: true, body: 'right1', animate: false },
                { position: 'bottom', header: 'Bottom', height: 100, resize: true, body: 'ft', gutter: '5px', collapse: true },
                { position: 'left',  width: 200, resize: true, body: 'menu', gutter: '5px', collapse: true, close: true, collapseSize: 50, scroll: true, animate: true },
                {position: 'center', body:'yui-main',scroll:true}
                 ]
        });
        
        layout.render();
        Event.DOMReady();
    });


})();
    </script>
--%>
</body>
</html>
